﻿import request from '/@/utils/request';
enum Api {
  AddCustomerChannel = '/api/customerChannel/add',
  DeleteCustomerChannel = '/api/customerChannel/delete',
  UpdateCustomerChannel = '/api/customerChannel/update',
  PageCustomerChannel = '/api/customerChannel/page',
  DetailCustomerChannel = '/api/customerChannel/detail',
  ListCustomerChannel = '/api/customerChannel/List',
}

// 增加渠道
export const addCustomerChannel = (params?: any) =>
	request({
		url: Api.AddCustomerChannel,
		method: 'post',
		data: params,
	});

// 删除渠道
export const deleteCustomerChannel = (params?: any) => 
	request({
			url: Api.DeleteCustomerChannel,
			method: 'post',
			data: params,
		});

// 编辑渠道
export const updateCustomerChannel = (params?: any) => 
	request({
			url: Api.UpdateCustomerChannel,
			method: 'post',
			data: params,
		});

// 分页查询渠道
export const pageCustomerChannel = (params?: any) => 
	request({
			url: Api.PageCustomerChannel,
			method: 'post',
			data: params,
		});

// 详情渠道
export const detailCustomerChannel = (id: any) => 
	request({
			url: Api.DetailCustomerChannel,
			method: 'get',
			data: { id },
		});


// 详情渠道
export const getListCustomerChannel = (params?: any) => 
	request({
			url: Api.ListCustomerChannel,
			method: 'get',
			data: params
		});

